@extends('layouts.app')

@section('title', '管理员列表')

@section('css-import')
<style type="text/css">
	.page-s{
		display: inline-block;
		padding-bottom: 0px;
		margin: 29px 9px;
		border-radius: 4px;
		float:  right;
	}
</style>
@endsection

@section('content-fluid')
<div class="row">
	<!-- BASIC TABLE -->
	<div class="panel">
		<div class="panel-heading">
			<h3 class="panel-title">所有管理员</h3>
		</div>
		<div class="panel-body">
			<table class="table table-hover">
				<thead>
					<tr>
						<th>#</th>
						<th>姓名</th>
						<th>手机号</th>
						<th>最后登陆IP</th>
						<th>管理角色</th>
						<th>注册时间</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					@foreach($admins as $k=>$v)
					<tr>
						<td>{{$v->admin_id}}</td>
						<td>{{$v->admin_name ?? '未填写'}}</td>
						<td>{{$v->admin_tel}}</td>
						<td>{{$v->admin_ip ?? '从未登陆'}}</td>
						<td>{{$v->power_name}}</td>
						<td>{{date('Y年m月d日',$v->insert_time)}}</td>
						<td>
							<a href="/system/create?admin_id={{$v->admin_id}}"><i class="fa fa-info-circle"></i> 查看</a>
						</td>
					</tr>
					@endforeach
				</tbody>
			</table>
			{{$admins->links()}}
			<div class="page-s">本页共{{ $admins->count() }}条</div>
			<div class="page-s">共{{ $admins->total() }}条</div>
			<div class="page-s">当前第{{ $admins->currentPage() }}页</div>
			<div class="page-s">共{{ $admins->lastPage() }}页</div>
		</div>
	</div>
	<!-- END BASIC TABLE -->
</div>

@endsection